package demo

class Animal(age: Int)


class Bird(name: String) extends Animal(10) {
  protected var aa: String = _
}

class smallBird private() extends Bird("fuck Bird~") {

  private var name: String = _


  def this(name: String, age: Int) = {
    this()
    this.name = name
    aa = "a"

  }
  def setName(n: String) = this.name = n

  def getName = this.name

  def setAa(string: String) = aa = string

  def getAa = aa

}


object demo{
  def main (args: Array[String] ): Unit = {
    var smallBird = new smallBird("小鸟",12)

    println(smallBird.getAa)
    println(smallBird.getName)
  }

}